package com.kingint.web.portal.base.controller;

import com.kingint.common.unitedresult.K;
import com.kingint.mbg.bas.entity.BasRoomState;
import com.kingint.web.portal.base.service.RoomStateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/roomState")
@Api(value = "RoomStateController", description = "前端客房状态控制层")
@CrossOrigin
public class RoomStateController {

    @Resource
    private RoomStateService roomStateService;

    @ApiOperation(value = "获取客房状态列表信息")
    @GetMapping("/getRoomStateList")
    public Object getRoomStateList(){
        List<BasRoomState> roomStateList = roomStateService.getRoomStateList();
        return K.ok().data(roomStateList);
    }
}
